<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Insert title here</title>
	<link type="text/css" rel="stylesheet"
		  href="//misc.360buyimg.com/??jdf/1.0.0/unit/ui-base/5.0.0/ui-base.css,jdf/1.0.0/unit/shortcut/5.0.0/shortcut.css,jdf/1.0.0/unit/global-header/1.0.0/global-header.css,jdf/1.0.0/unit/myjd/5.0.0/myjd.css,jdf/1.0.0/unit/nav/2.0.0/nav.css,jdf/1.0.0/unit/shoppingcart/2.0.0/shoppingcart.css,jdf/1.0.0/unit/global-footer/5.0.0/global-footer.css,jdf/1.0.0/unit/service/5.0.0/service.css,user/myjd/lib/1.0.0/widget/global/global.css">

	<link type="text/css" rel="stylesheet"
		  href="//misc.360buyimg.com/user/myjd/ordercenter/??css/myjd.order.css,widget/top-search/top-search.css,widget/order-table-list/order-table-list.css,widget/ui-page/ui-page.css,widget/order-goods-list/order-goods-list.css,widget/ui-slidebar/ui-slidebar.css,widget/common/common.css"
		  source="combo">
	<!-- 	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  -->
</head>
<body>
<div id="container">
	<div class="w">
		<div id="content">
			<div id="main">
				<div id="chunjie" class="mb10"></div>
				<div class="mod-main mod-comm mod-order" id="order01">
					<div class="mt">
						<h3>我的收藏</h3>
						<div class="extra-r"></div>
					</div>
				</div>
				<div class="safety-box hide"></div>

				<div class="mod-main mod-comm lefta-box" id="order02">
					<%--<div class="mt">--%>
					<%--<ul class="extra-l">--%>
					<%--<li class="fore1"><a class="txt curr">全部订单</a></li>--%>
					<%--</ul>--%>
					<%--</div>--%>
					<div class="mc">
						<table class="td-void order-tb" id="DataTables_list">
							<thead>
							<tr>
								<th >收藏编号</th>
								<th >影院名</th>
								<th >电影名</th>
								<th >电影时长</th>
								<th >电影票价</th>
								<th >影院地址</th>
								<%--<th>--%>
								<%--<div class="deal-state-cont" id="orderState">--%>
								<%--<div class="state-txt">状态</div>--%>

								<%--</div>--%>
								<%--</th>--%>
							</tr>
							</thead>
							<tbody id="tb-113810613169">

							</tbody>
						</table>

						<div class="mt20">
							<!-- <div class="pagin fr">
                                <span class="prev-disabled">上一页<b></b></span> <a
                                    class="current">1</a> <span class="next-disabled">下一页<b></b></span>
                            </div>
                            <div class="clr"></div> -->
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="../../front/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript">
	$(document).ready(function() {
		var accountName ="${sessionScope.account.accountName}";
		alert(accountName);
		$.ajax({
			async:true,
			url:"${pageContext.request.contextPath}/collect/findCollect",
			type:"GET",
			contentType:"application/json",
			data:{
				accountName: accountName
			},
			dataType:"json",
			success:function(result){// result是一个map
				console.log(result);
				//拼接查询到的信息
				var content = "";
				for (var i = 0; i < result.length; i++) {
					// var state = result[i].isDelete==0?"退票申请":(result[i].isDelete==1?"完成":"退票成功");
					content+="<tr>\n" +
							"<td>"+result[i].collectId+"</td>\n" +
							"<td>"+result[i].cinemaName+"</td>\n" +
							"<td>"+result[i].movieName+"</td>\n" +
							"<td>"+result[i].playTime+"</td>\n" +
							"<td>"+result[i].moviePrice+"</td>\n" +
							"<td width=\"100\">"+result[i].address+"</td>\n" +
							"</tr>";
				}
				$("#DataTables_list tbody").append(content);
			},
			//请求失败时的响应函数
			error:function(){
				console.log("请求失败");
			}
		});
	})
</script>
</body>
</html>